<style type="text/css">
	@media (max-width: 375px) {
		.edit-form tr td input {
			width: 100%;
		}

		.edit-form tr th:first-child,
		.edit-form tr td:first-child {
			width: 20%;
		}

		.edit-form tr th:nth-last-of-type(-n+2),
		.edit-form tr td:nth-last-of-type(-n+2) {
			display: none;
		}
	}

	.edit-form table>tbody>tr td a.btn-delcfg {
		visibility: hidden;
	}

	.edit-form table>tbody>tr:hover td a.btn-delcfg {
		visibility: visible;
	}
</style>
<div class="alert alert-success-light">
	<i class="fa fa-warning"></i> {:__('温馨提示')}
</div>
<div class="panel panel-default panel-intro">
	<div class="panel-heading">
		<ul class="nav nav-tabs">
			{foreach name="typeList" item="vo"}
			<li {empty name="type"} {eq name="key" value="freight"}class="active"{/eq} {else /} {eq name="type" value="$key"}class="active"{/eq} {/empty}> <a href="#{$key}" data-toggle="tab">{$vo}</a></li>
			{/foreach}
		</ul>
	</div>

	<div class="panel-body">
		<div id="myTabContent" class="tab-content">
			<div class="tab-pane fade {empty name='type'} active in {else /} {eq name='type' value='freight'}active in{/eq} {/empty}" id="freight">
				<div class="widget-body no-padding">
					<form id="freight-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>{:__('店铺类目样式')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::radios('row[category_style]', ['1'=>__('大图'), '2'=>__('九宫格'), '3'=>__('二级类目'), '4'=>__('多级类目样式')], is_array($row) ? $row.category_style : 3, ['data-rule'=>'required'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('运费组合策略')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												{:Form::radios('row[freight]', ['0'=>__('运费叠加'), '1'=>__('以最低结算'), '2'=>__('以最高结算')], !empty($row.freight) ? $row.freight : 2, ['data-rule'=>'required'])}
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('IM欢迎消息')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[welcome]" class="form-control" rows="5" data-tip="{:__('空,表示不使用欢迎消息')}">{$row.welcome|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>

			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='facesheet'}active in{/eq}{/notempty}" id="facesheet">
				<div class="widget-body no-padding">
					<form id="facesheet-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/edit')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>{:__('打印设备码')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[siid]" value="{$row.siid|htmlentities}" class="form-control" data-rule="required" data-tip="ACMD893784">
											</div>
											<div class="col-sm-4"></div>
										</div>

									</td>
								</tr>
								<tr>
									<td>{:__('模板ID')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[tempid]" value="{$row.tempid|htmlentities}" class="form-control" data-rule="required" data-tip="如：ad8470013eb64c979120ca75c6bf7bae">
											</div>
											<div class="col-sm-4"></div>
										</div>

									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='mailing'}active in{/eq}{/notempty}" id="mailing">
				<div class="widget-body no-padding">
					<form id="mailing-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>{:__('姓名(店铺名)')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[sendName]" value="{$row.sendName|htmlentities}" class="form-control" data-tip="张三" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('姓名(固话/手机)')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="number" name="row[sendPhoneNum]" value="{$row.sendPhoneNum|htmlentities}" class="form-control" data-tip="" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('寄件地址')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[sendAddr]" class="form-control" rows="5" data-tip="" data-rule="required">{$row.sendAddr|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='return'}active in{/eq}{/notempty}" id="return">
				<div class="widget-body no-padding">
					<form id="return-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('wanlshop.config/index')}">
						{:token()}
						<table class="table table-striped">
							<thead>
								<tr>
									<th width="200px">{:__('Title')}</th>
									<th>{:__('Value')}</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>{:__('姓名(店铺名)')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="text" name="row[returnName]" value="{$row.returnName|htmlentities}" class="form-control" data-tip="张三" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('固话/手机')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<input type="number" name="row[returnPhoneNum]" value="{$row.returnPhoneNum|htmlentities}" class="form-control" data-tip="请输入您的固话或手机号" data-rule="required">
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td>{:__('退货地址')}</td>
									<td>
										<div class="row">
											<div class="col-sm-8 col-xs-12">
												<textarea name="row[returnAddr]" class="form-control" rows="5" data-tip="" data-rule="required">{$row.returnAddr|htmlentities}</textarea>
											</div>
											<div class="col-sm-4"></div>
										</div>
									</td>
								</tr>
							</tbody>
							<tfoot>
								<tr>
									<td></td>
									<td>
										<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
										<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
									</td>
								</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			{if $margin > 0}
			<div class="tab-pane fade {notempty name='type'}{eq name='type' value='margin'}active in{/eq}{/notempty}" id="margin">
				<div class="widget-body no-padding">
					<!-- 注意：移除了action属性，避免默认提交 -->
					<form id="margin-form" class="edit-form form-horizontal" role="form" method="POST">
						{:token()}
						<table class="table table-striped">
							<thead>
							<tr>
								<th width="200px">{:__('Title')}</th>
								<th>{:__('Value')}</th>
							</tr>
							</thead>
							<tbody>
<!--							<tr>-->
<!--								<td>备注</td>-->
<!--								<td>-->
<!--									<div class="row">-->
<!--										<div class="col-sm-8 col-xs-12">-->
<!--											<input type="text" name="row[remark]" class="form-control" data-tip="请输入备注信息">-->
<!--										</div>-->
<!--									</div>-->
<!--								</td>-->
<!--							</tr>-->
						{if $isUrlRussian}
<!--							<tr>-->
<!--								<td>{:__('应缴纳')}</td>-->
<!--								<td>-->
<!--									<div class="row">-->
<!--										<div class="col-sm-8 col-xs-12">-->
<!--											<span>{$margin}</span>-->
<!--										</div>-->
<!--									</div>-->
<!--								</td>-->
<!--							</tr>-->
								<tr>
									<td>{:__('保证金支付')}</td>
									<td>
										<div id="qrcode-container" style="text-align: center; margin: 20px 0; display: none;">
											<p style="margin-bottom: 15px; font-weight: bold;">{:__('请扫描下方二维码完成支付')}</p>
											<img id="payment-qrcode" src="" style="max-width: 200px; border: 1px solid #eee; padding: 10px;">
											<p id="payment-status" style="margin-top: 15px;"></p>
										</div>
										<div id="payment-success" style="display: none; text-align: center; padding: 20px; background: #f0f9eb; color: #67c23a;">
											<i class="fa fa-check-circle" style="font-size: 24px;"></i>
											<p style="margin-top: 10px; font-size: 16px;">{:__('支付成功')}！</p>
										</div>
									</td>
								</tr>
							</tbody>

						{else /}
							<!-- 支付二维码区域 -->

							<tr>
								<td>{:__('保证金支付')}</td>
								<td>
									<div id="qrcode-container" style="text-align: center; margin: 20px 0; display: none;">
										<p style="margin-bottom: 15px; font-weight: bold;">{:__('请扫描下方二维码完成支付')}</p>
										<img id="payment-qrcode" src="" style="max-width: 200px; border: 1px solid #eee; padding: 10px;">
										<p id="payment-status" style="margin-top: 15px;"></p>
									</div>
									<div id="payment-success" style="display: none; text-align: center; padding: 20px; background: #f0f9eb; color: #67c23a;">
										<i class="fa fa-check-circle" style="font-size: 24px;"></i>
										<p style="margin-top: 10px; font-size: 16px;">{:__('支付成功')}！</p>
									</div>
								</td>
							</tr>
							</tbody>
							{/if}
							<tfoot>
							<tr>
								<td></td>
								<td>
									<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
									<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
								</td>
							</tr>
							</tfoot>
						</table>
					</form>
				</div>
			</div>
			{/if}
		</div>
	</div>
</div>
